import { lazy } from 'react'
import { DesktopOutlined } from '@ant-design/icons'
import { AdminRouterItem } from '../../router'

const Enterprise = lazy(() => import('./index'))
const EnterpriseList = lazy(() => import('./list'))
const Enterpriseprofile = lazy(() => import('./profile'))
const EnterpriseDesc = lazy(() => import('./desc'))


const EnterpriseProfileResult = lazy(() => import('./profile/result'))
const EnterpriseProfileRule = lazy(() => import('./profile/rule'))
const EnterpriseProfileContent = lazy(() => import('./profile/content'))
const EnterpriseProfileLevel = lazy(() => import('./profile/level'))

const demoRoutes: AdminRouterItem[] = [
  {
    path: 'enterprise',
    element: <Enterprise />,
    meta: {
      label: '企业档案',
      title: '企业档案',
      key: '/enterprise',
      icon: <DesktopOutlined />,
    },
    children: [
      {
        path: 'list',
        element: <EnterpriseList />,
        meta: {
          label: '企业列表',
          title: '企业列表',
          key: '/enterprise/list',
          icon: <DesktopOutlined />,
        },
      },
      {
        path: 'desc/:id',
        element: <EnterpriseDesc />,
      },
      {
        path: 'profile',
        element: <Enterpriseprofile />,
        meta: {
          label: '企业画像',
          title: '企业画像',
          key: '/enterprise/profile',
          icon: <DesktopOutlined />,
        },
        children: [
          {
            path: 'result',
            element: <EnterpriseProfileResult />,
            meta: {
              label: '评估结果',
              title: '评估结果',
              key: '/enterprise/profile/result'
            }
          },
          {
            path: 'rule',
            element: <EnterpriseProfileRule />,
            meta: {
              label: '评估规则设置',
              title: '评估规则设置',
              key: '/enterprise/profile/rule'
            }
          },
          {
            path: 'content',
            element: <EnterpriseProfileContent />,
            meta: {
              label: '评估规则内容',
              title: '评估规则内容',
              key: '/enterprise/profile/content'
            }
          },
          {
            path: 'level',
            element: <EnterpriseProfileLevel />,
            meta: {
              label: '企业画像等级',
              title: '企业画像等级',
              key: '/enterprise/profile/level'
            }
          },
        ]
      },
    ],
  },
]

export default demoRoutes
